      var blog;

			blog = new google.Blog(function() {
				blog.getPostsJson(onLoadFeed);
			}, window.name);

			function onLoadFeed(data) {
			  var
          prefs = new gadgets.Prefs(),
          blogTags = "",
          labels = new Array(),
          links = data.data.feed.link,
			    categories = data.data.feed.category,
          posts = data.data.feed.entry,
          blogLink;

        for(var a = 0; a < links.length; a++) {
          if(links[a].rel == 'alternate') blogLink = links[a].href;
        }

        for(var m = 0; m < categories.length; m++) {
			    labels.push({term: categories[m].term, link: blogLink + "search/label/" + categories[m].term, num: 0});
			  }

        if(labels.length > 0) {
          for(var i = 0; i < labels.length; i++) {
            for(var j = 0; j < posts.length; j++) {
              var postCats = posts[j].category;
              if(undefined != postCats) {
                for(var k = 0; k < postCats.length; k++) {
                  if(labels[i].term == postCats[k].term) labels[i].num++;
                }
              }
            }
          }
        
          blogTags += "<tags>";
          for (var l = 0; l < labels.length; l++) blogTags += "<a href='" + labels[l].link + "' style='" + labels[l].num + "'>" + labels[l].term + "</a>";
          blogTags += "</tags>";

          /*var flashvars = {
            mode: "tags",
            minFontSize: prefs.getString("bcminfontsize"),
            maxFontSize: prefs.getString("bcmaxfontsize"),
            showTagWeight: (prefs.getBool("bcshowtagweight")) ? "true" : "false",
            tcolor: "0x" + prefs.getString("bctcolor"),
            tcolor2: "0x" + prefs.getString("bctcolor2"),
            hicolor: "0x" + prefs.getString("bchicolor"),
            distr: "distr",
            tspeed: "100",
            tagcloud: blogTags
          };
          var params = {
            wmode: (prefs.getBool("bcwmode")) ? "transparent" : "window",
            bgcolor: "#" + prefs.getString("bcbgcolor"),
            allowscriptaccess: "always"
          };
          var attributes = {
            id: "b-cumulus",
            name: "tagcloud"
          };
          swfobject.embedSWF(
            "http://b-cumulus.googlecode.com/svn/trunk/tagcloud.swf",
            "b-cumulus",
            prefs.getString('bcwidth'),
            prefs.getString('bcheight'),
            "9.0.0",
            false,
            flashvars,
            params,
            attributes
          );*/
          var url = "http://b-cumulus.googlecode.com/svn/trunk/tagcloud.swf";
          var flashVars =
            'mode=tags' +
            '&minFontSize=' + prefs.getString("bcminfontsize") +
          	'&maxFontSize=' + prefs.getString("bcmaxfontsize") +
            '&showTagWeight=' + ((prefs.getBool("bcshowtagweight")) ? "true" : "false") +
          	'&tcolor=' + "0x" + prefs.getString("bctcolor") +
            '&tcolor2=' + "0x" + prefs.getString("bctcolor2") +
            '&hicolor=' + "0x" + prefs.getString("bchicolor") +
            '&distr=distr' +
            '&tspeed=' + prefs.getString('bctspeed') +
            '&tagcloud=' + blogTags;
          gadgets.flash.embedFlash(url, "b-cumulus", 10, {
            swf_version: 10,
            id: "b-cumulus",
            name: "tagcloud",
            width: prefs.getInt('bcwidth'),
            height: prefs.getInt('bcheight'),
            wmode: (prefs.getBool("bcwmode")) ? "transparent" : "window",
            bgcolor: "#" + prefs.getString("bcbgcolor"),
            allowscriptaccess: "always",
            flashVars: flashVars
          });
        }
			}

